fix: correct bounds check in path_with_height to prevent index out of…#128
Closed
GHJ75 wants to merge 1 commit intovleue:mainfrom
Closed
fix: correct bounds check in path_with_height to prevent index out of…#128GHJ75 wants to merge 1 commit intovleue:mainfrom
GHJ75 wants to merge 1 commit intovleue:mainfrom
Conversation
… bounds Changed line 116 from `self.path.len() < next_i` to `self.path.len() <= next_i` to properly handle the case when next_i equals the path length. This fixes a panic that occurred when: - self.path.len() is 3 and next_i is 3 - The old check (3 < 3) was false, so it didn't break - Then self.path[3] caused an index out of bounds error The correct check ensures we break before attempting to access an invalid index. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
CodSpeed Performance ReportMerging #128 will degrade performance by 10.86%Comparing Summary
Benchmarks breakdown
|
Member
|
fixed by #124 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… bounds
Changed line 116 from
self.path.len() < next_itoself.path.len() <= next_ito properly handle the case when next_i equals the path length.This fixes a panic that occurred when:
The correct check ensures we break before attempting to access an invalid index.
🤖 Generated with Claude Code